//
//  ETCollectionViewCell.m
//  MyProject
//
//  Created by dllo on 15/11/2.
//  Copyright © 2015年 蓝鸥科技. All rights reserved.
//

#import "ETCollectionViewCell.h"
#define cellWidth self.bounds.size.width
#define cellHeight self.bounds.size.height
@implementation ETCollectionViewCell
- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        
        self.headpic = [[UIImageView alloc]init];
        _headpic.contentMode = UIViewContentModeScaleAspectFill;
        _headpic.clipsToBounds = YES;
        [self addSubview:_headpic];
        
        self.footpic = [[UIImageView alloc]init];
        [self addSubview:self.footpic];
        
//        self.blur = [[UIVisualEffectView alloc]initWithEffect:[UIBlurEffect effectWithStyle:UIBlurEffectStyleLight]];
//        _blur.alpha = 0.7;
//        [self.headpic addSubview:_blur];
        
        self.foot = [[UIVisualEffectView alloc] initWithEffect:[UIBlurEffect effectWithStyle:UIBlurEffectStyleLight]];
        [self addSubview:_foot];
//        if (![[NSUserDefaults standardUserDefaults] boolForKey:@"isWhite"]) {
//            
//                    self.foot = [[UIVisualEffectView alloc] initWithEffect:[UIBlurEffect effectWithStyle:UIBlurEffectStyleDark]];
//                    [self addSubview:_foot];
//        }else{
//            
//                    self.foot = [[UIVisualEffectView alloc] initWithEffect:[UIBlurEffect effectWithStyle:UIBlurEffectStyleLight]];
//                    [self addSubview:_foot];
//        }
        
//        self.bgImage = [[UIImageView alloc] init];
//        [self addSubview:_bgImage];
//        
//        self.create_timeLabel = [[UILabel alloc] init];
////        _create_timeLabel.textColor = [UIColor whiteColor];
//        _create_timeLabel.textColor = [UIColor blackColor];
//        _create_timeLabel.font = [UIFont systemFontOfSize:12];
//        [self.headpic addSubview:_create_timeLabel];
        
//        self.readImage = [[UIImageView alloc] init];
//        _readImage.image = [UIImage imageNamed:@"iconfont-book-recommend@2x.png"];
//        [self.headpic addSubview:_readImage];
//        
//        self.readImage = [[UILabel alloc] init];
////        _readImage.textColor = [UIColor whiteColor];
////        _readImage.textColor =[ UIColor whiteColor];
//        _readImage.textColor = [UIColor blackColor];
//        _readImage.font = [UIFont systemFontOfSize:12];
//        [self.headpic addSubview:_readImage];
    }
    return self;
}

- (void)layoutSubviews
{
    [super layoutSubviews];
//    self.backgroundColor = [UIColor redColor];
    _headpic.frame = CGRectMake(0, 0, cellWidth, cellWidth);
    _footpic.frame = CGRectMake(0, cellWidth, cellWidth, cellHeight - cellWidth);

    _foot.frame = CGRectMake(0, cellWidth, cellWidth, cellHeight - cellWidth );
    

    
    
}

@end
